package com.sunlands.zlcx.usercenter.repository.share;

import com.sunlands.zlcx.usercenter.domain.share.UserShareZanDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UsersShareZanRepository extends JpaRepository<UserShareZanDO, Integer>, JpaSpecificationExecutor<UserShareZanDO> {
    List<UserShareZanDO> findAllByLearnIdOrderByCreateTimeDesc(Long learnId);
    UserShareZanDO findByLearnIdAndZanUserId(Long learnId, Long userId);
}

